<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>邮件详情</title>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/iCheck/custom.css}" rel="stylesheet">
    <link th:href="@{/css/animate.css}" rel="stylesheet">
    <link th:href="@{/css/style.css}" rel="stylesheet">
    <link th:href="#{/css/iCheck/custom.css}" rel="stylesheet">
</head>

<body>

    <div id="wrapper">



        <div class="wrapper wrapper-content gray-bg">
        <div class="row">
            <th:block th:include="include :: emailNavPage" />
            <div class="col-lg-9 animated fadeInRight">
            <div class="mail-box-header">
                <div class="pull-right tooltip-demo">
                    <a href="/system/email" class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="top" title="Reply"><i class="fa fa-reply"></i> Reply</a>
                    <a href="#" class="btn btn-info btn-sm" data-toggle="tooltip" data-placement="top" title="Print email"><i class="fa fa-print"></i> </a>
                    <button class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="移到垃圾箱" onclick="remarkTrash()"><i class="fa fa-trash-o"></i> </button>
                </div>
                <h2>
                    Ding-Flow在线邮件
                </h2>
                <div class="mail-tools tooltip-demo m-t-md">
                    <input type="hidden" th:value="${sysOaEmail.id}" id="id">

                    <h3>
                        <span class="font-normal">主题: </span><span th:text="${sysOaEmail.emailSubject}"></span>
                    </h3>
                    <h5>
                        <span class="pull-right font-normal" th:text="${#dates.format(sysOaEmail.sendTime, 'yyyy-MM-dd hh:mm:ss')}"></span>
                        <span class="font-normal">From: </span><span th:text="${sysOaEmail.emailFromUser.email}"></span>
                    </h5>
                </div>
            </div>
                <div class="mail-box">


                <div class="mail-body" th:utext="${sysOaEmail.emailContent}">

                </div>

                        <div class="mail-body text-right tooltip-demo">
                                <a class="btn btn-sm btn-success" href="/system/email"><i class="fa fa-reply"></i> Reply</a>
                              <!--  <a class="btn btn-sm btn-info" href="/system/email"><i class="fa fa-arrow-right"></i> Forward</a>-->
             <!--                   <button title="" data-placement="top" data-toggle="tooltip" type="button" data-original-title="Print" class="btn btn-sm btn-white"><i class="fa fa-print"></i> Print</button>-->
                            <button class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="移到垃圾箱" onclick="remarkTrash()"><i class="fa fa-trash-o"></i> </button>
                        </div>
                        <div class="clearfix"></div>


                </div>
            </div>
        </div>
        </div>
        </div>
    <script th:src="@{/js/jquery.js}"></script>
    <script th:src="@{/js/bootstrap.min.js}"></script>
    <script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
    <script th:src="@{/js/plugins/pace/pace.min.js}"></script>
    <script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
    <script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
    <script th:src="@{/ajax/libs/layui/layui.js}"></script>
    <script th:src="@{/ruoyi/js/common.js}"></script>
    <script th:src="@{/ruoyi/js/ry-ui.js}"></script>
    <script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
    <script th:src="@{/ajax/libs/bootstrap-table/bootstrap-table.min.js?v=20200727}"></script>
    <script th:src="@{/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=20200727}"></script>
    <script th:src="@{/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js?v=20200727}"></script>
    <script>
        var prefix =  "/system/email";
        $(document).ready(function(){
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });

            $.get(prefix+"/getSysOaEmailData", function(data) {
                if (data.code == web_status.SUCCESS ) {
                    var sysOaEmailData=data.data;
                    $("#readTotal").text(sysOaEmailData.readTotal);
                    $("#draftsTotal").text(sysOaEmailData.draftsTotal);
                }  else if (data.code == web_status.WARNING) {
                    $.modal.alertWarning(data.msg)
                }  else {
                    $.modal.alertError(data.msg);
                }
            });
        });

        function remarkTrash(){

            $.operate.save(prefix + "/remarkDelete",{
                "ids":$("#id").val()
            });
        }
    </script>
</body>

</html>
